projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
820f5fe
)
(grep-expand-template): Use save-match-data.
author
Kim F. Storm
<storm@cua.dk>
Mon, 1 May 2006 09:33:10 +0000
(09:33 +0000)
committer
Kim F. Storm
<storm@cua.dk>
Mon, 1 May 2006 09:33:10 +0000
(09:33 +0000)
lisp/progmodes/grep.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/grep.el
b/lisp/progmodes/grep.el
index 7d8cc9d5c6406f3c1203deb8ef5e24e2643099e6..0aba9d42b84633f1b3f0a38a90539653270b985c 100644
(file)
--- a/
lisp/progmodes/grep.el
+++ b/
lisp/progmodes/grep.el
@@
-581,8
+581,13
@@
substitution string. Note dynamic scoping of variables.")
(case-fold-search nil))
(dolist (kw grep-expand-keywords command)
(if (string-match (car kw) command)
- (setq command (replace-match (or (eval (cdr kw)) "")
- t t command))))))
+ (setq command
+ (replace-match
+ (or (if (symbolp (cdr kw))
+ (eval (cdr kw))
+ (save-match-data (eval (cdr kw))))
+ "")
+ t t command))))))
(defun grep-read-regexp ()
"Read regexp arg for interactive grep."